
import { baseUrl }  from  './config'
import { fetch ,postJson} from  './httpFly' 
//通用接口
export const commonSite= (data) => { 
	let body={
		model: data.model,
        offset:data.offset || 0,
        limit:data.limit || 100,
        with:data.with,
        orderBy:data.orderBy || "",
        search: {},
        condition:data.condition,
    }
	return postJson(baseUrl+'common/get-list-by-condition',body)
}

//获得详情
export const getInfoById= (data) => {
	return postJson(baseUrl+'common/get-info-by-id',data)
}
//更新
export const createSite= (data) => {
	return postJson(baseUrl+'common/update-or-create-data',data)
}
//登录接口
 
export const postLogin= (body) => { 
	return postJson(baseUrl+'login/user-login',body)
}

//发送短息
export const getSendMsg= (body) => { 
	return postJson(baseUrl+'login/send-message',body)
}

//获取openid
export const getOpendId= (body) => { 
	return postJson(baseUrl+'we-chat',body)
}


//取消关注
export const deleteData= (body) => { 
	return postJson(baseUrl+'common/delete-data',body)
}

//修改手机号验证
export const oldPhoneVerify= (body) => { 
	return postJson(baseUrl+'login/old-phone-verify',body)
}

//修改手机号替换手机号
export const newPhoneVerify= (body) => { 
	return postJson(baseUrl+'login/new-phone-replace',body)
}

//微信支付签名
export const payWeChatPay= (body) => { 
	return postJson(baseUrl+'pay/we-chat-pay',body)
}